package com.jy.rhin.application.document;

import cn.org.chiss.rhin._2015.document.repository.ProvideAndRegisterDocumentSet;
import com.jy.rhin.application.assembler.DocumentStorageAssembler;
import com.jy.rhin.application.infra.DocumentApplicationService;
import com.jy.rhin.sdk.dto.document.DocumentProvideAndRegisterDto;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @Description:
 * @Author: lww
 * @Date: 2022/6/2 8:48
 */
@Service
public class StorageService {

    @Resource
    private DocumentApplicationService documentApplicationService;

    /**
     * 文档提交
     * @param provideAndRegisterDocumentSet
     * @return
     */
    public DocumentProvideAndRegisterDto documentProvide(ProvideAndRegisterDocumentSet provideAndRegisterDocumentSet) {
        DocumentProvideAndRegisterDto documentProvideAndRegisterDto = DocumentStorageAssembler.toDto(provideAndRegisterDocumentSet);
        return documentApplicationService.documentProvide(documentProvideAndRegisterDto);
    }
}
